package org.trafficman.trafficman_sample_test;

import org.punit.runner.*;
import org.punit.type.*;
import org.punit.type.Parameter;

public class ParamTestClass implements Parameterized {

    public static void main(String[] args) {
        new SoloRunner().run(ParamTestClass.class);
    }
    
    public Parameter[] parameters() {
        return new Parameter[] { new ParameterImpl(10), new ParameterImpl(20) };
    }

    public void testA(ParameterImpl param) {
        System.out.println("testA count = " + param.count()); //$NON-NLS-1$
        SampleUtil.doSomething();
    }
    
    public void testB(ParameterImpl param) {
        System.out.println("testB count = " + param.count()); //$NON-NLS-1$
        SampleUtil.doSomething();
    }
    
    public void testC(ParameterImpl param) {
        System.out.println("testB count = " + param.count()); //$NON-NLS-1$
        SampleUtil.doSomething();
    }
    
    public void setUpAfterWatchers(Parameter param) throws Exception {

    }

    public void setUpBeforeWatchers(Parameter param) throws Exception {

    }

    public void tearDownAfterWatchers(Parameter param) throws Exception {

    }

    public void tearDownBeforeWatchers(Parameter param) throws Exception {

    }

    static class ParameterImpl implements Parameter {
        private int _count;

        ParameterImpl(int count) {
            _count = count;
        }

        public int count() {
            return _count;
        }
        
        public String toString() {
            return String.valueOf(_count);
        }
    }
}
